Postfix to use a third party SMTP server

3 Mar

This instructs postfix to use a third party SMTP server. It’s useful when you want to relay e-mail from an internal server which uses a dynamic IP address.

Ensure postfix is installed, and let’s have all e-mail sent to root relay to an external e-mail address:

nano /etc/postfix/sender_canonical
root     youremail@provider.tld

Postfix requires the modifications to be hashed:

postmap hash:/etc/postfix/sender_canonical
postconf -e "sender_canonical_maps=hash:/etc/postfix/sender_canonical"

Now let’s instruct postfix to use third party SMTP to route e-mail:

nano /etc/postfix/main.cf
relayhost = yoursmtp.provider.tld
service postfix restart

Finally update system aliases:

nano /etc/aliases
root:   email@domain.tld
newaliases

169 thoughts on “Postfix to use a third party SMTP server

  1. Wonderful work! That is the kind of information that are supposed to be shared across the web. Shame on Google for no longer positioning this put up higher! Come on over and seek advice from my website . Thank you =)

  2. [url=https://fastpriligy.top/]can i buy priligy in usa[/url] There s no way, I can t can lasix cause erectile dysfunction be bothered, I can t be bothered, let s Enzyte Natural Male Enhancement can lasix cause erectile dysfunction just bear with it

  3. det. Denne side har bestemt alle de oplysninger, jeg ønskede om dette emne, og vidste ikke, hvem jeg skulle spørge. Dette er min 1. kommentar her, så jeg ville bare give en hurtig

  4. at web, except I know I am getting familiarity all the time by reading thes pleasant posts.|Fantastic post. I will also be handling some of these problems.|Hello, I think this is a great blog. I happened onto it;) I have bookmarked it and will check it out again. The best way to change is via wealth and independence. May you prosper and never stop mentoring others.|I was overjoyed to find this website. I must express my gratitude for your time because this was an amazing read! I thoroughly enjoyed reading it, and I’ve bookmarked your blog so I can check out fresh content in the future.|Hi there! If I shared your blog with my Facebook group, would that be okay? I believe there are a lot of people who would truly value your article.|منشور رائع. سأتعامل مع بعض هذه|

  5. hello there and thanks on your information – I have definitely picked up anything new from proper here. I did on the other hand expertise some technical points using this web site, since I skilled to reload the site lots of times prior to I may just get it to load correctly. I have been pondering in case your web host is OK? No longer that I’m complaining, however sluggish loading cases occasions will sometimes affect your placement in google and could damage your high-quality ranking if ads and ***********|advertising|advertising|advertising and *********** with Adwords. Anyway I’m adding this RSS to my email and can glance out for a lot extra of your respective fascinating content. Make sure you replace this once more very soon..

  6. Com tanto conteúdo e artigos, alguma vez se deparou com problemas de plágio ou violação de direitos de autor? O meu site tem muito conteúdo exclusivo que eu próprio criei ou

  7. nenarazili jste někdy na problémy s plagorismem nebo porušováním autorských práv? Moje webové stránky mají spoustu unikátního obsahu, který jsem vytvořil.

  8. Hello, i read your blog from time to time and i own a similar one and i was just wondering if you get a lot of spam remarks? If so how do you reduce it, any plugin or anything you can suggest? I get so much lately it’s driving me crazy so any help is very much appreciated.

  9. Wow that was strange. I just wrote an extremely long comment but after I clicked submit my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyways, just wanted to say excellent blog!

  10. obviously like your web-site however you need to take a look at the spelling on quite a few of your posts. Several of them are rife with spelling problems and I find it very bothersome to inform the truth nevertheless I will certainly come back again.

  11. What i do not realize is actually how you are not actually much more well-liked than you may be now. You’re so intelligent. You realize therefore considerably relating to this subject, produced me personally consider it from numerous varied angles. Its like women and men aren’t fascinated unless it’s one thing to do with Lady gaga! Your own stuffs nice. Always maintain it up!

  12. Hey there this is kinda of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding experience so I wanted to get advice from someone with experience. Any help would be enormously appreciated!

  13. at web, except I know I am getting familiarity all the time by reading thes pleasant posts.|Fantastic post. I will also be handling some of these problems.|Hello, I think this is a great blog. I happened onto it;) I have bookmarked it and will check it out again. The best way to change is via wealth and independence. May you prosper and never stop mentoring others.|I was overjoyed to find this website. I must express my gratitude for your time because this was an amazing read! I thoroughly enjoyed reading it, and I’ve bookmarked your blog so I can check out fresh content in the future.|Hi there! If I shared your blog with my Facebook group, would that be okay? I believe there are a lot of people who would truly value your article.|منشور رائع. سأتعامل مع بعض هذه|

  14. Com tanto conteúdo e artigos, alguma vez se deparou com problemas de plágio ou violação de direitos de autor? O meu site tem muito conteúdo exclusivo que eu próprio criei ou

  15. My partner and I stumbled over here from a different web page and thought I might check things out. I like what I see so i am just following you. Look forward to looking over your web page for a second time.

  16. Com tanto conteúdo e artigos, alguma vez se deparou com problemas de plágio ou violação de direitos de autor? O meu site tem muito conteúdo exclusivo que eu próprio criei ou

  17. Definitely believe that which you stated. Your favorite reason seemed to be on the internet the easiest thing to be aware of. I say to you, I certainly get irked while people think about worries that they just don’t know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects , people can take a signal. Will likely be back to get more. Thanks

  18. Wonderful beat ! I would like to apprentice while you amend your website, how can i subscribe for a blog website? The account aided me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided bright clear idea

  19. My partner and I stumbled over here coming from a different web address and thought I should check things out. I like what I see so now i am following you. Look forward to looking over your web page yet again.

  20. I am curious to find out what blog platform you’re working with? I’m experiencing some minor security problems with my latest site and I’d like to find something more secure. Do you have any recommendations?

  21. Just want to say your article is as amazing. The clarity in your post is simply great and i can assume you are an expert on this subject. Well with your permission allow me to grab your feed to keep updated with forthcoming post. Thanks a million and please keep up the rewarding work.

Leave a Reply

Your email address will not be published.